{include file=cart.header.html}
<script type="text/javascript" src="{lib file=ecmall.js}" charset="utf-8"></script>
{include file=order.shipping.html}
<!-- 内容 -->
<div class="content-shop">
	<div class="shop-address-progress"></div>
	<form action="index.php?app=order&act=make_order" method="post" id="confirm_order">
		<div class="shop-address">
			<dl>
				<dt>
					<h4>确认收货地址</h4>
				</dt>
				<dd>
					<ul class="shop-address-ul">
						<!--{foreach from=$my_address item=address name=address_select}-->
						<!-- {if $address_id}-->
						<li {if $address.addr_id==$address_id} class="sphover"{/if}>
							<input id="address_{$address.addr_id}" type="radio" {if $address.addr_id==$address_id} checked="true"{/if} name="address_options" value="{$address.addr_id}" />
							<label for="address_{$address.addr_id}">
								{$address.region_name|escape}&nbsp;&nbsp;{$address.address|escape}&nbsp;&nbsp;{$address.consignee|escape}&nbsp;&nbsp;
								<!--{if $address.phone_mob}-->
								{$address.phone_mob}
								<!--{else}-->
								{$address.phone_tel}
								<!--{/if}-->
							</label>
						</li>
						<!--{else}-->
						<li {if $smarty.foreach.address_select.iteration ==1} class="sphover"{/if}>
							<input id="address_{$address.addr_id}" type="radio" {if $smarty.foreach.address_select.iteration == 1} checked="true"{/if} name="address_options" value="{$address.addr_id}" />
							<label for="address_{$address.addr_id}">
								{$address.region_name|escape}&nbsp;&nbsp;{$address.address|escape}&nbsp;&nbsp;{$address.consignee|escape}&nbsp;&nbsp;
								<!--{if $address.phone_mob}-->
								{$address.phone_mob}
								<!--{else}-->
								{$address.phone_tel}
								<!--{/if}-->
							</label>
						</li>
						<!--{/if}-->
						<!--{/foreach}-->
					</ul>
				</dd>
				<dd class="shop-btn-wrap">
					<a href="javascript:void(0)" class="shop-newaddr" id="shop_newaddr">新增新地址</a>
					<a href="{url app=my_address}" class="linkbtn" target="_blank">管理收货地址</a>
				</dd>
			</dl>
		</div>
		<div class="shop-confirm-title">确认订单</div>
		<div class="shop-confirm-wrap">
			<div class="shop-title f-cb">
				<div class="f-fl w310">商品</div>
				<div class="f-fl w150">单价（元）</div>
				<div class="f-fl w150">数量</div>
				<div class="f-fl w150">小计（元）</div>
				<div class="f-fl w150">运费</div>
			</div>
			<!--{foreach from=$trans_list item=order key=store_id}-->
			<div class="shop-every">
				<div class="shop-each">
					<div class="shop-seller f-cb">
						<div class="f-fl">
							<span>卖家：</span>
							<a href="{url app=store&id=$store_id}">{$order.store_name|escape}</a>
						</div>
						<div class="f-fl">
							<!--{if $order.im_qq}-->
							<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin={$goods.im_qq}&amp;site=qq&amp;menu=yes">
								<img src="{res file=images/member/qq.jpg}" alt="QQ"></a>
							<!--{/if}-->
							<!--{if $order.im_ww}-->
							<a target="_blank" href="http://www.taobao.com/webww/ww.php?ver=3&touid={$goods.im_ww}&siteid=cntaobao&status=1&charset=utf-8">
								<img src="{res file=images/member/wangwang.jpg}" alt="旺旺"></a>
							<!--{/if}-->
						</div>
					</div>

					<div class="shop-detail">
						<table width="100%">
							<!--{foreach from=$order.goods item=goods}-->
							<tr>
								<td width="140">
									<div class="imgwarp">
										<a href="{url app=goods&id=$goods.goods_id}" target="_blank">
											<img src="{$goods.goods_image}" alt="{$goods.goods_name|escape}" height="80" />
										</a>
									</div>
								</td>
								<td width="150">
									<p class="pt">
										<a href="{url app=goods&id=$goods.goods_id}" target="_blank"  class="linkbtn">{$goods.goods_name|escape}</a>
									</p>
									<p class="pt">{$goods.specification|escape}</p>
								</td>

								<td width="150">
									<p>{$goods.price|price}</p>
								</td>
								<td width="150">
									<p>{$goods.quantity}</p>
								</td>
								<td width="150">
									<p id="item{$goods.rec_id}_subtotal">{$goods.subtotal|price}</p>
								</td>
								<!--{if $goods.rowspan}-->
								<td rowspan="{$goods.rowspan}"  style="border-left:1px solid #f2f2f2">
									<!--{if $goods.shipping_desc =='运费到付'}-->
									<div class="shop-m-a">
										<p id="item{$goods.rec_id}_shipping_fee">
											<input name="shipping_confirm" type="checkbox" value="1" onclick="empty_checkbox_error()" />
											运费到付
										</p>
										<p id="item{$goods.rec_id}_shipping_desc" class="arrival-draft">请勾选确认运费到付，具体运费请咨询客服</p>
									</div>
									<!--{else}-->
									<div class="shop-m-a">
										<p id="item{$goods.rec_id}_shipping_fee">{$goods.shipping_fee|price}</p>
										<a onmouseenter="carriage_s(this)" onmouseleave="carriage_h(this)" class="fixpng">运费详情</a>
										<p class="shop-m-adetail" id="item{$goods.rec_id}_shipping_desc"> <b>货品总量：</b>
											{$goods.unit|escape}
											<br> <b>运费费率：</b>
											{$goods.shipping_desc|escape}
											<!--{if $goods.shipping_name}-->
											<br>
											<b>物流公司：</b>
											{$goods.shipping_name|escape}
											<!--{/if}-->
										</p>
									</div>
									<!--{/if}-->
								</td>
								<!--{/if}-->
							</tr>
							<!--{/foreach}-->
						</table>
					</div>
				</div>
				<div class="shop-confirm-total">
					<ul class="f-cb">
						<li>给卖家留言：</li>
						<li class="shop-m-w">
							<textarea name="message{$store_id}" id="message{$store_id}" onfocus="focusText(this)" onblur="blurText(this)"></textarea>
						<label for="message{$store_id}">告诉卖家您的要求</label>
					</li>
					<li style="float: right;">
						<table width="100%">
							<tr>
								<td>商品总额：</td>
								<td>
									<p id="order{$store_id}_amount">{$order.amount|price}</p>
								</td>
								<td>+ 运费：</td>
								<td>
									<p id="order{$store_id}_shipping_fee">{$order.shipping_fee|price}</p>
								</td>
								<td>=店铺总额：</td>
								<td> <em id="order{$store_id}_total">{$order.total|price}</em>
								</td>
							</tr>
						</table>
					</li>
				</ul>
			</div>
			<div class="shop-confirm-total" style="padding-top: 0;">
				<table>
					<tr>
						<td width="18">
							<input name="is_invoice{$store_id}" id="is_invoice{$store_id}" type="checkbox" value="1" onclick="show_invoice(this)" />
						</td>
						<td>
							<label for="is_invoice{$store_id}">发票是否随同跟货物一起发出</label>
						</td>
					</tr>
				</table>
				<div class="invoice_wrap">
					<ul class="f-cb">
						<li class="f-none">
							<input name="invoice_type{$store_id}" type="radio" id="invoice_single_{$store_id}" enctype="{$store_id}" value="1" checked="checked" onclick="empty_errorlabel()" />
							<label for="invoice_single_{$store_id}">个人</label>
						</li>
						<li class="f-none">
							<input name="invoice_type{$store_id}" type="radio" id="invoice_comp_{$store_id}" enctype="{$store_id}" value="2" onclick="empty_errorlabel()" />
							<label for="invoice_comp_{$store_id}">公司</label>
							<input name="inv_content{$store_id}" id="inv_content{$store_id}" type="text" maxlength="50" placeholder="填写公司名称" />
						</li>
					</ul>
					<ul class="f-cb">
						<li>温馨提示：</li>
						<li>发票由卖家开具并寄出</li>
					</ul>
				</div>
			</div>
		</div>
		<!--{/foreach}-->
	</div>
	<div class="shop-total-price f-cb">
		<dl class="f-fr">
			<dt>
				<ul>
					<li> <strong>应付总额（含运费）：</strong> <em id="totalprice">{$order_total.total|price}</em>
					</li>
					<li class="f-cb">
						<p id="default_shipping_address" class="f-fr">
							{$default_address.region_name|escape} {$default_address.address|escape}
						</p>
						<p class="f-fr">寄送至：</p>
					</li>
					<li class="f-cb">
						<p id="default_shipping_name" class="f-fr">
							{$default_address.consignee} {$default_address.phone_mob|escape}
						</p>
						<p class="f-fr">收货人：</p>
					</li>
				</ul>
			</dt>
			<dd class="tr">
				<input type="submit" value="提交订单" class="subbtnhsbm" name="submit" />
			</dd>
			<dd>
				<span>若价格变动，请在提交订单后联系卖家改价，并查看已买到的商品</span>
			</dd>
		</dl>
	</div>
</form>
<script>
	$(function(){
		var	subbtnhsbm=$('input.subbtnhsbm');
		subbtnhsbm.bind('click',function(){
			var address_ul_lis=$('ul.shop-address-ul > li'),
				checked=address_ul_lis.children('input[checked="true"]').length;
			if(checked>=1){
				return true;
			}else{
				wl.sConfirm({'info':'收货地址不能为空','cancel':true});
				return false;
			}
		});
	});
</script>
</div>
<!-- 页脚 -->
{include file="footer.index.simple.html"}